package com.swp.oa.sys.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.swp.oa.sys.dao.IDepartmentDao;
import com.swp.oa.sys.dao.IDepartmentUserDao;
import com.swp.oa.sys.pojo.DepartmentUser;
import com.swp.oa.sys.pojo.DepartmentUserKey;
import com.swp.oa.sys.service.IDepartmentUserService;

@Service("departmentUserService")
public class DepartmentUserServiceImpl implements IDepartmentUserService{

	@Autowired
	private IDepartmentUserDao departmentUserDao;
	
	@Autowired
	private IDepartmentDao departmentDao;
	
	@Override
	public int deleteByPrimaryKey(DepartmentUserKey key) {
		departmentUserDao.deleteByPrimaryKey(key);
		return 0;
	}

	@Override
	public int save(DepartmentUser record) {
		departmentUserDao.insertSelective(record);
		return 0;
	}

	@Override
	public DepartmentUser selectByPrimaryKey(DepartmentUserKey key) {
		departmentUserDao.selectByPrimaryKey(key);
		return null;
	}

	@Override
	public int update(DepartmentUser record) {
		departmentUserDao.updateByPrimaryKeySelective(record);
		return 0;
	}

	

}
